Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename dlt_common.c into dlt_common.cpp. #506

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Rename dlt_common.c into dlt_common.cpp. #506

merged 1 commit into from
Jul 30, 2024

Conversation

LocutusOfBorg
Copy link
Contributor

This makes sure c++ compiler is used and not plain c, failing with some error like

[ 10%] Building C object qdlt/CMakeFiles/qdlt.dir/dlt_common.c.o
cd /dlt-viewer/obj-x86_64-linux-gnu/qdlt && /usr/bin/cc -DBYTE_ORDER=LITTLE_ENDIAN -DPLUGIN_INSTALLATION_PATH="/usr/lib/x86_64-linux-gnu/dlt-viewer/plugins" -DQT5 -DQT5_QT6_COMPAT -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_SERIALPORT_LIB -DQT_VIEWER -D_TTY_POSIX_ -Dqdlt_EXPORTS -I/dlt-viewer/obj-x86_64-linux-gnu/qdlt -I/dlt-viewer/qdlt -I/dlt-viewer/obj-x86_64-linux-gnu/qdlt/qdlt_autogen/include -I/dlt-viewer/qdlt/../src -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt6/QtSerialPort -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/dlt-viewer=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu99 -fPIC -Wall -Wextra -pedantic -Wno-variadic-macros -Wno-strict-aliasing -fPIC -MD -MT qdlt/CMakeFiles/qdlt.dir/dlt_common.c.o -MF CMakeFiles/qdlt.dir/dlt_common.c.o.d -o CMakeFiles/qdlt.dir/dlt_common.c.o -c /dlt-viewer/qdlt/dlt_common.c
In file included from /usr/include/x86_64-linux-gnu/qt6/QtCore/qglobal.h:37,
from /usr/include/x86_64-linux-gnu/qt6/QtCore/QtGlobal:1,
from /dlt-viewer/qdlt/export_rules.h:1,
from /dlt-viewer/qdlt/dlt_common.h:67,
from /dlt-viewer/qdlt/dlt_common.c:70:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qtypes.h:163:15: error: expected declaration specifiers or '...' before 'sizeof'
163 | static_assert(sizeof(ptrdiff_t) == sizeof(size_t), "Weird ptrdiff_t and size_t definitions");
| ^~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qtypes.h:163:52: error: expected declaration specifiers or '...' before string constant
163 | static_assert(sizeof(ptrdiff_t) == sizeof(size_t), "Weird ptrdiff_t and size_t definitions");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/dlt-viewer/qdlt/dlt_common.c: In function 'dlt_message_header_flags':
/dlt-viewer/qdlt/dlt_common.c:753:47: warning: taking address of packed member of 'struct ' may result in an unaligned pointer value [-Waddress-of-packed-member]
753 | timeinfo = localtime ((const time_t*)(&(msg->storageheader->seconds)));

@vifactor
Copy link
Collaborator

I believe the issue is not in the fact that this file is compiled by C-compiler (at the end it contains C-code and not C++), the problem is that qdlt/export_rules.h file for some reason contains #include <QtGlobal>, which I guess it shouldn't. The error comes from that file which is a c++ header (and hence legitimately contains static_assert)

@LocutusOfBorg
Copy link
Contributor Author

@vifactor looks like the macOS and windows builds are now failing...

@vifactor
Copy link
Collaborator

vifactor commented Jul 22, 2024

@LocutusOfBorg yeah, I see... Making it a clean way does not seem easy. Maybe maintainers will accept your initial change: simple renaming.

Out of curiosity: what combination of OS, compiler and build system produces that error for you?

@LocutusOfBorg
Copy link
Contributor Author

pushed again!

@LocutusOfBorg
Copy link
Contributor Author

@vifactor it's an up-to-date debian sid
https://buildd.debian.org/status/fetch.php?pkg=dlt-viewer&arch=amd64&ver=2.26.0%2Bdfsg-2&stamp=1721631881&raw=0
Toolchain package versions: binutils_2.42.90.20240720-1 dpkg-dev_1.22.8 g++-13_13.3.0-3 gcc-13_13.3.0-3 libc6-dev_2.39-4 libstdc++-13-dev_13.3.0-3 libstdc++6_14.1.0-5 linux-libc-dev_6.9.10-1
Package versions: apt_2.9.6 asciidoc_10.2.0-2 asciidoc-base_10.2.0-2 asciidoc-common_10.2.0-2 autoconf_2.71-3 automake_1:1.16.5-1.3 autopoint_0.22.5-1 autotools-dev_20220109.1 base-files_13.3 base-passwd_3.6.4 bash_5.2.21-2.1 binutils_2.42.90.20240720-1 binutils-common_2.42.90.20240720-1 binutils-x86-64-linux-gnu_2.42.90.20240720-1 bsdextrautils_2.40.2-1 bsdutils_1:2.40.2-1 build-essential_12.10 bzip2_1.0.8-5.1 ca-certificates_20240203 cmake_3.30.0-1 cmake-data_3.30.0-1 coreutils_9.4-3.1 cpp_4:13.2.0-7 cpp-13_13.3.0-3 cpp-13-x86-64-linux-gnu_13.3.0-3 cpp-x86-64-linux-gnu_4:13.2.0-7 dash_0.5.12-9 dblatex_0.3.12py3-4 debconf_1.5.87 debhelper_13.16 debian-archive-keyring_2023.4 debianutils_5.20 dh-autoreconf_20 dh-strip-nondeterminism_1.14.0-1 diffutils_1:3.10-1 distro-info-data_0.62 docbook-xml_4.5-13 docbook-xsl_1.79.2+dfsg-7 dpkg_1.22.8 dpkg-dev_1.22.8 dumb-init_1.2.5-3 dwz_0.15-1+b1 e2fsprogs_1.47.1-1 fakeroot_1.35.1-1 file_1:5.45-3 findutils_4.10.0-2 fontconfig_2.15.0-1.1 fontconfig-config_2.15.0-1.1 fonts-dejavu-core_2.37-8 fonts-dejavu-mono_2.37-8 fonts-gfs-baskerville_1.1-6 fonts-gfs-porson_1.1-7 fonts-lmodern_2.005-1 g++_4:13.2.0-7 g++-13_13.3.0-3 g++-13-x86-64-linux-gnu_13.3.0-3 g++-x86-64-linux-gnu_4:13.2.0-7 gcc_4:13.2.0-7 gcc-13_13.3.0-3 gcc-13-base_13.3.0-3 gcc-13-x86-64-linux-gnu_13.3.0-3 gcc-14-base_14.1.0-5 gcc-x86-64-linux-gnu_4:13.2.0-7 gettext_0.22.5-1 gettext-base_0.22.5-1 gpgv_2.2.43-7 grep_3.11-4 groff-base_1.23.0-5 gzip_1.12-1.1 hostname_3.23+nmu2 init-system-helpers_1.66 intltool-debian_0.35.0+20060710.6 libabsl20230802_20230802.1-4 libacl1_2.3.2-2 libapache-pom-java_29-2 libapt-pkg6.0t64_2.9.6 libarchive-zip-perl_1.68-1 libarchive13t64_3.7.2-2.1 libasan8_14.1.0-5 libatomic1_14.1.0-5 libattr1_1:2.5.2-1 libaudit-common_1:3.1.2-4 libaudit1_1:3.1.2-4+b1 libavahi-client3_0.8-13+b2 libavahi-common-data_0.8-13+b2 libavahi-common3_0.8-13+b2 libb2-1_0.98.1-1.1+b1 libbibtex-parser-perl_1.04+dfsg-1 libbinutils_2.42.90.20240720-1 libblkid1_2.40.2-1 libbrotli1_1.1.0-2+b4 libbsd0_0.12.2-1 libbz2-1.0_1.0.8-5.1 libc-bin_2.39-4 libc-dev-bin_2.39-4 libc6_2.39-4 libc6-dev_2.39-4 libcairo2_1.18.0-3+b1 libcap-ng0_0.8.5-1+b1 libcap2_1:2.66-5 libcc1-0_14.1.0-5 libcom-err2_1.47.1-1 libcommons-logging-java_1.3.0-1 libcommons-parent-java_56-1 libcrypt-dev_1:4.4.36-4 libcrypt1_1:4.4.36-4 libctf-nobfd0_2.42.90.20240720-1 libctf0_2.42.90.20240720-1 libcups2t64_2.4.10-1 libcurl3t64-gnutls_8.8.0-4 libcurl4t64_8.8.0-4 libdatrie1_0.2.13-3 libdb5.3t64_5.3.28+dfsg2-7 libdbus-1-3_1.14.10-4+b1 libdebconfclient0_0.272 libdebhelper-perl_13.16 libdouble-conversion3_3.3.0-1+b1 libdpkg-perl_1.22.8 libdrm-amdgpu1_2.4.121-2 libdrm-common_2.4.121-2 libdrm-intel1_2.4.121-2 libdrm-radeon1_2.4.121-2 libdrm2_2.4.121-2 libduktape207_2.7.0-2+b1 libedit2_3.1-20240517-1 libegl-mesa0_24.1.3-2 libegl1_1.7.0-1+b1 libelf1t64_0.191-2 libevdev2_1.13.2+dfsg-1 libexpat1_2.6.2-1 libext2fs2t64_1.47.1-1 libfakeroot_1.35.1-1 libffi8_3.4.6-1 libfile-homedir-perl_1.006-2 libfile-stripnondeterminism-perl_1.14.0-1 libfile-which-perl_1.27-2 libfontbox-java_1:1.8.16-5 libfontconfig1_2.15.0-1.1 libfontenc1_1:1.1.8-1 libfreetype6_2.13.2+dfsg-1+b4 libgbm1_24.1.3-2 libgcc-13-dev_13.3.0-3 libgcc-s1_14.1.0-5 libgcrypt20_1.11.0-2 libgdbm-compat4t64_1.23-6 libgdbm6t64_1.23-6 libgl-dev_1.7.0-1+b1 libgl1_1.7.0-1+b1 libgl1-mesa-dri_24.1.3-2 libglapi-mesa_24.1.3-2 libglib2.0-0t64_2.80.4-1 libglvnd0_1.7.0-1+b1 libglx-dev_1.7.0-1+b1 libglx-mesa0_24.1.3-2 libglx0_1.7.0-1+b1 libgmp10_2:6.3.0+dfsg-2+b1 libgnutls30t64_3.8.6-2 libgomp1_14.1.0-5 libgpg-error0_1.49-2 libgprofng0_2.42.90.20240720-1 libgraphite2-3_1.3.14-2 libgssapi-krb5-2_1.21.3-3 libgudev-1.0-0_238-5 libharfbuzz0b_8.3.0-2+b1 libhogweed6t64_3.10-1 libhwasan0_14.1.0-5 libice6_2:1.0.10-1+b1 libicu72_72.1-5 libidn2-0_2.3.7-2 libinput-bin_1.26.0-1 libinput10_1.26.0-1 libio-string-perl_1.08-4 libisl23_0.26-3+b2 libitm1_14.1.0-5 libjansson4_2.14-2+b2 libjpeg62-turbo_1:2.1.5-3 libjs-jquery_3.6.1+dfsg+~3.5.14-1 libjsoncpp25_1.9.5-6+b2 libk5crypto3_1.21.3-3 libkeyutils1_1.6.3-3 libkpathsea6_2024.20240313.70630+ds-2 libkrb5-3_1.21.3-3 libkrb5support0_1.21.3-3 liblatex-tounicode-perl_0.54-2 libldap-2.5-0_2.5.18+dfsg-2 libllvm17t64_1:17.0.6-12+b1 liblsan0_14.1.0-5 liblz4-1_1.9.4-2 liblzma5_5.6.2-2 libmagic-mgc_1:5.45-3 libmagic1t64_1:5.45-3 libmd0_1.1.0-2 libmd4c0_0.4.8-1+b1 libmime-charset-perl_1.013.1-2 libmount1_2.40.2-1 libmpc3_1.3.1-1+b2 libmpfi0_1.5.4+ds-3 libmpfr6_4.2.1-1+b1 libmtdev1t64_1.1.6-1.2 libncursesw6_6.5-2 libnettle8t64_3.10-1 libnghttp2-14_1.62.1-2 libnghttp3-9_1.3.0-2 libngtcp2-16_1.5.0-2 libngtcp2-crypto-gnutls8_1.5.0-2 libopengl-dev_1.7.0-1+b1 libopengl0_1.7.0-1+b1 libp11-kit0_0.25.5-2 libpam-modules_1.5.3-7 libpam-modules-bin_1.5.3-7 libpam-runtime_1.5.3-7 libpam0g_1.5.3-7 libpaper-utils_1.1.29+b1 libpaper1_1.1.29+b1 libpciaccess0_0.17-3+b1 libpcre2-16-0_10.42-4+b1 libpcre2-8-0_10.42-4+b1 libpdfbox-java_1:1.8.16-5 libperl5.38t64_5.38.2-5 libpipeline1_1.5.7-2 libpixman-1-0_0.42.2-1+b1 libpng16-16t64_1.6.43-5 libpotrace0_1.16-2+b1 libproc2-0_2:4.0.4-5 libproxy1v5_0.5.7-1 libpsl5t64_0.21.2-1.1 libptexenc1_2024.20240313.70630+ds-2 libpython3-stdlib_3.12.4-1 libpython3.12-minimal_3.12.4-3 libpython3.12-stdlib_3.12.4-3 libqt6concurrent6_6.6.2+dfsg-10 libqt6core6t64_6.6.2+dfsg-10 libqt6dbus6_6.6.2+dfsg-10 libqt6gui6_6.6.2+dfsg-10 libqt6jsonrpc6_6.6.2-2 libqt6languageserver6_6.6.2-2 libqt6network6_6.6.2+dfsg-10 libqt6opengl6_6.6.2+dfsg-10 libqt6openglwidgets6_6.6.2+dfsg-10 libqt6printsupport6_6.6.2+dfsg-10 libqt6qml6_6.6.2+dfsg-4 libqt6qmlcompiler6_6.6.2+dfsg-4 libqt6qmlmodels6_6.6.2+dfsg-4 libqt6qmlworkerscript6_6.6.2+dfsg-4 libqt6quick6_6.6.2+dfsg-4 libqt6quickcontrols2-6_6.6.2+dfsg-4 libqt6quickshapes6_6.6.2+dfsg-4 libqt6quicktemplates2-6_6.6.2+dfsg-4 libqt6quicktest6_6.6.2+dfsg-4 libqt6quickwidgets6_6.6.2+dfsg-4 libqt6serialport6_6.6.2-2 libqt6sql6_6.6.2+dfsg-10 libqt6test6_6.6.2+dfsg-10 libqt6widgets6_6.6.2+dfsg-10 libqt6xml6_6.6.2+dfsg-10 libquadmath0_14.1.0-5 libre-engine-re2-perl_0.18+ds-1+b5 libre2-11_20240501-3 libreadline8t64_8.2-4 librhash0_1.4.3-3+b1 librtmp1_2.4+20151223.gitfa8646d.1-2+b4 libsasl2-2_2.1.28+dfsg1-6 libsasl2-modules-db_2.1.28+dfsg1-6 libseccomp2_2.5.5-1+b1 libselinux1_3.5-2+b3 libsemanage-common_3.5-1 libsemanage2_3.5-1+b4 libsensors-config_1:3.6.0-10 libsensors5_1:3.6.0-10 libsepol2_3.5-2+b1 libsframe1_2.42.90.20240720-1 libsm6_2:1.2.3-1+b1 libsmartcols1_2.40.2-1 libsombok3_2.4.0-2+b1 libsqlite3-0_3.46.0-1 libss2_1.47.1-1 libssh2-1t64_1.11.0-5 libssl3t64_3.2.2-1 libstdc++-13-dev_13.3.0-3 libstdc++6_14.1.0-5 libsynctex2_2024.20240313.70630+ds-2 libsystemd0_256.2-1 libtasn1-6_4.19.0-3+b2 libteckit0_2.5.12+ds1-1 libtexlua53-5_2024.20240313.70630+ds-2 libthai-data_0.1.29-2 libthai0_0.1.29-2 libtinfo6_6.5-2 libtool_2.4.7-7 libts0t64_1.22-1.1 libtsan2_14.1.0-5 libubsan1_14.1.0-5 libuchardet0_0.0.8-1+b1 libudev1_256.2-1 libunicode-linebreak-perl_0.0.20190101-1+b7 libunistring5_1.2-1 libuuid1_2.40.2-1 libuv1t64_1.48.0-5 libvulkan-dev_1.3.283.0-1 libvulkan1_1.3.283.0-1 libwacom-common_2.10.0-2 libwacom9_2.10.0-2 libwayland-client0_1.22.0-2.1+b1 libwayland-server0_1.22.0-2.1+b1 libx11-6_2:1.8.7-1+b1 libx11-data_2:1.8.7-1 libx11-dev_2:1.8.7-1+b1 libx11-xcb1_2:1.8.7-1+b1 libxau-dev_1:1.0.9-1+b1 libxau6_1:1.0.9-1+b1 libxaw7_2:1.0.14-1+b2 libxcb-cursor0_0.1.4-1+b1 libxcb-dri2-0_1.17.0-2 libxcb-dri3-0_1.17.0-2 libxcb-glx0_1.17.0-2 libxcb-icccm4_0.4.1-1.1+b1 libxcb-image0_0.4.0-2+b1 libxcb-keysyms1_0.4.0-1+b2 libxcb-present0_1.17.0-2 libxcb-randr0_1.17.0-2 libxcb-render-util0_0.3.9-1+b1 libxcb-render0_1.17.0-2 libxcb-shape0_1.17.0-2 libxcb-shm0_1.17.0-2 libxcb-sync1_1.17.0-2 libxcb-util1_0.4.0-1+b1 libxcb-xfixes0_1.17.0-2 libxcb-xinput0_1.17.0-2 libxcb-xkb1_1.17.0-2 libxcb1_1.17.0-2 libxcb1-dev_1.17.0-2 libxdmcp-dev_1:1.1.2-3+b1 libxdmcp6_1:1.1.2-3+b1 libxext6_2:1.3.4-1+b1 libxfixes3_1:6.0.0-2+b1 libxi6_2:1.8.1-1 libxkbcommon-dev_1.6.0-1+b1 libxkbcommon-x11-0_1.6.0-1+b1 libxkbcommon0_1.6.0-1+b1 libxml2_2.12.7+dfsg-3+b1 libxml2-utils_2.12.7+dfsg-3+b1 libxmu6_2:1.1.3-3+b2 libxpm4_1:3.5.17-1+b1 libxrender1_1:0.9.10-1.1+b1 libxshmfence1_1.3-1+b1 libxslt1.1_1.1.35-1.1 libxt6t64_1:1.2.1-1.2 libxxf86vm1_1:1.1.4-1+b2 libxxhash0_0.8.2-2+b1 libyaml-tiny-perl_1.74-1 libz3-4_4.8.12-3.1+b2 libzstd1_1.5.6+dfsg-1 libzzip-0-13t64_0.13.72+dfsg.1-1.2+b1 linux-libc-dev_6.9.10-1 lmodern_2.005-1 login_1:4.15.3-2 logsave_1.47.1-1 m4_1.4.19-4 make_4.3-4.1 man-db_2.12.1-2 mawk_1.3.4.20240622-2 media-types_10.1.0 mount_2.40.2-1 ncurses-base_6.5-2 ncurses-bin_6.5-2 netbase_6.4 openssl_3.2.2-1 passwd_1:4.15.3-2 patch_2.7.6-7 perl_5.38.2-5 perl-base_5.38.2-5 perl-modules-5.38_5.38.2-5 po-debconf_1.0.21+nmu1 policy-rcd-declarative_0.6 policy-rcd-declarative-deny-all_0.6 preview-latex-style_13.2-1 procps_2:4.0.4-5 python-apt-common_2.9.0 python3_3.12.4-1 python3-apt_2.9.0+b1 python3-minimal_3.12.4-1 python3.12_3.12.4-3 python3.12-minimal_3.12.4-3 qmake6_6.6.2+dfsg-10 qmake6-bin_6.6.2+dfsg-10 qt6-base-dev_6.6.2+dfsg-10 qt6-base-dev-tools_6.6.2+dfsg-10 qt6-declarative-dev_6.6.2+dfsg-4 qt6-declarative-dev-tools_6.6.2+dfsg-4 qt6-qmllint-plugins_6.6.2+dfsg-4 qt6-qmltooling-plugins_6.6.2+dfsg-4 qt6-qpa-plugins_6.6.2+dfsg-10 qt6-serialport-dev_6.6.2-2 readline-common_8.2-4 rpcsvc-proto_1.4.3-1 sbuild-build-depends-main-dummy_0.invalid.0 sed_4.9-2 sensible-utils_0.0.24 sgml-base_1.31 sgml-data_2.0.11+nmu1 shared-mime-info_2.4-5 sysvinit-utils_3.09-2 t1utils_1.41-4 tar_1.35+dfsg-3 tex-common_6.18 texlive_2024.20240706-1 texlive-base_2024.20240706-1 texlive-bibtex-extra_2024.20240706-2 texlive-binaries_2024.20240313.70630+ds-2 texlive-extra-utils_2024.20240706-2 texlive-fonts-recommended_2024.20240706-1 texlive-lang-greek_2024.20240706-1 texlive-latex-base_2024.20240706-1 texlive-latex-extra_2024.20240706-2 texlive-latex-recommended_2024.20240706-1 texlive-luatex_2024.20240706-1 texlive-pictures_2024.20240706-1 texlive-plain-generic_2024.20240706-2 texlive-science_2024.20240706-2 tzdata_2024a-4 ucf_3.0043+nmu1 usr-is-merged_39 util-linux_2.40.2-1 x11-common_1:7.7+23.1 x11proto-dev_2024.1-1 xdg-utils_1.1.3-4.1 xfonts-encodings_1:1.0.4-2.2 xfonts-utils_1:7.7+6 xkb-data_2.42-1 xml-core_0.19 xorg-sgml-doctools_1:1.11-1.1 xsltproc_1.1.35-1.1 xtrans-dev_1.4.0-1 xz-utils_5.6.2-2 zlib1g_1:1.3.dfsg+really1.3.1-1
dh_auto_configure --
-DDLT_USE_STANDARD_INSTALLATION_LOCATION=ON
-DDLT_USE_QT_RPATH=OFF
-DDLT_PARSER=ON
-DDLT_DUMMY_PLUGINS=ON
-DDLT_INSTALL_SDK=OFF
cd obj-x86_64-linux-gnu && DEB_PYTHON_INSTALL_LAYOUT=deb cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON "-GUnix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu -DDLT_USE_STANDARD_INSTALLATION_LOCATION=ON -DDLT_USE_QT_RPATH=OFF -DDLT_PARSER=ON -DDLT_DUMMY_PLUGINS=ON -DDLT_INSTALL_SDK=OFF ..
-- The CXX compiler identification is GNU 13.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found WrapOpenGL: TRUE
-- Found XKB: /usr/lib/x86_64-linux-gnu/libxkbcommon.so (Required is at least version "0.5.0")
-- Found WrapVulkanHeaders: /usr/include
-- Found Qt6 version: 6.6.2

@alexmucde alexmucde added this to the Release v2.27.0 milestone Jul 23, 2024
@alexmucde alexmucde self-requested a review July 23, 2024 07:43
@alexmucde
Copy link
Collaborator

@LocutusOfBorg Please add a signed off statement to your commit message, then i will merge.

This makes sure c++ compiler is used and not plain c, failing with some error like

[ 10%] Building C object qdlt/CMakeFiles/qdlt.dir/dlt_common.c.o
cd /dlt-viewer/obj-x86_64-linux-gnu/qdlt && /usr/bin/cc -DBYTE_ORDER=LITTLE_ENDIAN -DPLUGIN_INSTALLATION_PATH=\"/usr/lib/x86_64-linux-gnu/dlt-viewer/plugins\" -DQT5 -DQT5_QT6_COMPAT -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_SERIALPORT_LIB -DQT_VIEWER -D_TTY_POSIX_ -Dqdlt_EXPORTS -I/dlt-viewer/obj-x86_64-linux-gnu/qdlt -I/dlt-viewer/qdlt -I/dlt-viewer/obj-x86_64-linux-gnu/qdlt/qdlt_autogen/include -I/dlt-viewer/qdlt/../src -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt6/QtSerialPort -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/dlt-viewer=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu99 -fPIC   -Wall -Wextra -pedantic -Wno-variadic-macros -Wno-strict-aliasing -fPIC -MD -MT qdlt/CMakeFiles/qdlt.dir/dlt_common.c.o -MF CMakeFiles/qdlt.dir/dlt_common.c.o.d -o CMakeFiles/qdlt.dir/dlt_common.c.o -c /dlt-viewer/qdlt/dlt_common.c
In file included from /usr/include/x86_64-linux-gnu/qt6/QtCore/qglobal.h:37,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/QtGlobal:1,
                 from /dlt-viewer/qdlt/export_rules.h:1,
                 from /dlt-viewer/qdlt/dlt_common.h:67,
                 from /dlt-viewer/qdlt/dlt_common.c:70:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qtypes.h:163:15: error: expected declaration specifiers or '...' before 'sizeof'
  163 | static_assert(sizeof(ptrdiff_t) == sizeof(size_t), "Weird ptrdiff_t and size_t definitions");
      |               ^~~~~~
/usr/include/x86_64-linux-gnu/qt6/QtCore/qtypes.h:163:52: error: expected declaration specifiers or '...' before string constant
  163 | static_assert(sizeof(ptrdiff_t) == sizeof(size_t), "Weird ptrdiff_t and size_t definitions");
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/dlt-viewer/qdlt/dlt_common.c: In function 'dlt_message_header_flags':
/dlt-viewer/qdlt/dlt_common.c:753:47: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
  753 |         timeinfo = localtime ((const time_t*)(&(msg->storageheader->seconds)));

Signed-off-by: Gianfranco Costamagna <[email protected]>
Signed-off-by: Gianfranco Costamagna <[email protected]>
@LocutusOfBorg
Copy link
Contributor Author

done!

@alexmucde alexmucde merged commit b5a1cb0 into COVESA:master Jul 30, 2024
4 checks passed
@alexmucde
Copy link
Collaborator

@LocutusOfBorg Sorry i had to revert the changes. They are not working in Windows with qmake and VisualC++ compiler. Some further changes possibly needed.
I cannot reopen the PR, please creat a new one

LocutusOfBorg added a commit to LocutusOfBorg/dlt-viewer that referenced this pull request Jul 31, 2024
This makes sure c++ compiler is used and not plain c, failing with some error.

Signed-off-by: Gianfranco Costamagna <[email protected]>
Signed-off-by: Gianfranco Costamagna <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants